\(\int x^2 (a (b x^n)^p)^q \, dx\) [190]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 15, antiderivative size = 23 \[ \int x^2 \left (a \left (b x^n\right )^p\right )^q \, dx=\frac {x^3 \left (a \left (b x^n\right )^p\right )^q}{3+n p q} \]

[Out]

x^3*(a*(b*x^n)^p)^q/(n*p*q+3)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {1971, 30} \[ \int x^2 \left (a \left (b x^n\right )^p\right )^q \, dx=\frac {x^3 \left (a \left (b x^n\right )^p\right )^q}{n p q+3} \]

[In]

Int[x^2*(a*(b*x^n)^p)^q,x]

[Out]

(x^3*(a*(b*x^n)^p)^q)/(3 + n*p*q)

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 1971

Int[(u_.)*((c_.)*((d_.)*((a_.) + (b_.)*(x_))^(n_))^(q_))^(p_), x_Symbol] :> Dist[(c*(d*(a + b*x)^n)^q)^p/(a +
b*x)^(n*p*q), Int[u*(a + b*x)^(n*p*q), x], x] /; FreeQ[{a, b, c, d, n, q, p}, x] &&  !IntegerQ[q] &&  !Integer
Q[p]

Rubi steps \begin{align*} \text {integral}& = \left (x^{-n p q} \left (a \left (b x^n\right )^p\right )^q\right ) \int x^{2+n p q} \, dx \\ & = \frac {x^3 \left (a \left (b x^n\right )^p\right )^q}{3+n p q} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.00 \[ \int x^2 \left (a \left (b x^n\right )^p\right )^q \, dx=\frac {x^3 \left (a \left (b x^n\right )^p\right )^q}{3+n p q} \]

[In]

Integrate[x^2*(a*(b*x^n)^p)^q,x]

[Out]

(x^3*(a*(b*x^n)^p)^q)/(3 + n*p*q)

Maple [A] (verified)

Time = 0.16 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.04

method result size
gosper \(\frac {x^{3} {\left (a \left (b \,x^{n}\right )^{p}\right )}^{q}}{n p q +3}\) \(24\)
parallelrisch \(\frac {x^{3} {\left (a \left (b \,x^{n}\right )^{p}\right )}^{q}}{n p q +3}\) \(24\)

[In]

int(x^2*(a*(b*x^n)^p)^q,x,method=_RETURNVERBOSE)

[Out]

x^3*(a*(b*x^n)^p)^q/(n*p*q+3)

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.26 \[ \int x^2 \left (a \left (b x^n\right )^p\right )^q \, dx=\frac {x^{3} e^{\left (n p q \log \left (x\right ) + p q \log \left (b\right ) + q \log \left (a\right )\right )}}{n p q + 3} \]

[In]

integrate(x^2*(a*(b*x^n)^p)^q,x, algorithm="fricas")

[Out]

x^3*e^(n*p*q*log(x) + p*q*log(b) + q*log(a))/(n*p*q + 3)

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 41 vs. \(2 (19) = 38\).

Time = 0.93 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.78 \[ \int x^2 \left (a \left (b x^n\right )^p\right )^q \, dx=\begin {cases} \frac {x^{3} \left (a \left (b x^{n}\right )^{p}\right )^{q}}{n p q + 3} & \text {for}\: n p q \neq -3 \\x^{3} \left (a \left (b x^{n}\right )^{p}\right )^{q} \log {\left (x \right )} & \text {otherwise} \end {cases} \]

[In]

integrate(x**2*(a*(b*x**n)**p)**q,x)

[Out]

Piecewise((x**3*(a*(b*x**n)**p)**q/(n*p*q + 3), Ne(n*p*q, -3)), (x**3*(a*(b*x**n)**p)**q*log(x), True))

Maxima [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.17 \[ \int x^2 \left (a \left (b x^n\right )^p\right )^q \, dx=\frac {a^{q} b^{p q} x^{3} {\left ({\left (x^{n}\right )}^{p}\right )}^{q}}{n p q + 3} \]

[In]

integrate(x^2*(a*(b*x^n)^p)^q,x, algorithm="maxima")

[Out]

a^q*b^(p*q)*x^3*((x^n)^p)^q/(n*p*q + 3)

Giac [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.26 \[ \int x^2 \left (a \left (b x^n\right )^p\right )^q \, dx=\frac {x^{3} e^{\left (n p q \log \left (x\right ) + p q \log \left (b\right ) + q \log \left (a\right )\right )}}{n p q + 3} \]

[In]

integrate(x^2*(a*(b*x^n)^p)^q,x, algorithm="giac")

[Out]

x^3*e^(n*p*q*log(x) + p*q*log(b) + q*log(a))/(n*p*q + 3)

Mupad [B] (verification not implemented)

Time = 5.67 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.00 \[ \int x^2 \left (a \left (b x^n\right )^p\right )^q \, dx=\frac {x^3\,{\left (a\,{\left (b\,x^n\right )}^p\right )}^q}{n\,p\,q+3} \]

[In]

int(x^2*(a*(b*x^n)^p)^q,x)

[Out]

(x^3*(a*(b*x^n)^p)^q)/(n*p*q + 3)